<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/font-awesome.min.css">
<link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
<link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../assets/css/amazeui.min.css">
<link rel="stylesheet" href="../../css/zoom.css">
<!-- <link rel="stylesheet" href="../../css/powerTips.css"> -->
<script src="../../libs/jquery.min.js" type='text/javascript'></script>
<script src="../../plugins/layer/layer.js" type='text/javascript'></script>
<script src="../../libs/bootstrap.min.js" type='text/javascript'></script>
<script src="../../libs/vue.min.js" type='text/javascript'></script>

<script src="../../plugins/jqgrid/grid.locale-cn.js" type='text/javascript'></script>
<script src="../../plugins/jqgrid/jquery.jqGrid.min.js" type='text/javascript'></script>
<script src="../../plugins/ztree/jquery.ztree.all.min.js" type='text/javascript'></script>
<script src="../../js/common.js" type='text/javascript'></script>
<script src="../../assets/js/amazeui.min.js" type='text/javascript'></script>
<script src="../../libs/ajaxupload.js" type='text/javascript'></script>
<script src="../../libs/zoom.js" type='text/javascript'></script>

<!-- <script src="../../plugins/core/HZBank.CoreNew.js"type='text/javascript'></script>
<script src="../../plugins/core/HZBank.Utils.js"type='text/javascript'></script>
<script src="../../plugins/core/underscore1.4.4.js"type='text/javascript'></script>
<script src="../../plugins/core/backbone1.0.0.js"type='text/javascript'></script>
<script src="../../plugins/core/HZBank.ViewNew.js"type='text/javascript'></script>
<script src="../../plugins/core/HZBank.Widget.Ext.js"type='text/javascript'></script>
<script src="../../plugins/core/HZBank.WidgetNew.js"type='text/javascript'></script>
<script src="../../plugins/core/HZBank.Window.js"type='text/javascript'></script> -->
<!-- <script src="../../libs/autocomplete.js"></script> -->

</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="form-group col-sm-12">
			<input type="text" class="form-control1" v-model="q.contractNo" @keyup.enter="query" placeholder="合同号">
		 	<div class="col-sm-10 parentCls" style="width: 151px;">
				<input type="text" id="roomNum" class="form-control1" placeholder="房号">
				<input type="hidden" class="form-control1" id="roomNumQuery">
				<div id="div_items1" class="div_items"></div>  
            </div>
			<input type="text" class="form-control1" v-model="q.rentUser" @keyup.enter="query" placeholder="租赁人">
			<input type="text" class="form-control1" v-model="q.salesMan" @keyup.enter="query" placeholder="业务员">
		    <input id="endDateS" class="form-control1 laydate-icon"  
		    data-am-datepicker readonly  v-model="q.endDateS" type="text" placeholder="合同截止开始日期">
		     <input id="endDateE" class="form-control1 laydate-icon"  
		    data-am-datepicker readonly  v-model="q.endDateE" type="text" placeholder="合同截止结束日期">
			</div>
		<div class="grid-btn">
			<a class="btn btn-primary"  @click="query" ><i class="fa fa-search"></i>&nbsp;查询</a>
			<a v-if="hasPermission('com:contract:save')" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			<a v-if="hasPermission('com:contract:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			<a class="btn btn-primary" @click="supple"><i class="fa fa-pencil-square-o"></i>&nbsp;变更</a>
			<a class="btn btn-primary" @click="end"><i class="fa fa-pencil-square-o"></i>&nbsp;终止合同</a>
			<a class="btn btn-primary"  @click="exportExcel" ><i class="fa fa-download"></i>&nbsp;导出</a>
			<!-- <a v-if="hasPermission('com:contract:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a> -->
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
											<div class="form-group">
			   	<div class="col-sm-2 control-label">合同编号</div>
			   	<div class="col-sm-10">
			      <input  type="text" class="form-control" v-model="comContract.contractNo" placeholder="合同编号"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">合同起始日期</div>
			   	<div class="col-sm-10">
			      <input type="text" id="startDate" class="form-control" readonly data-am-datepicker v-model="comContract.startDate" placeholder="合同起始日期"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">合同截止日期</div>
			   	<div class="col-sm-10">
			      <input type="text" id="endDate" class="form-control" readonly data-am-datepicker v-model="comContract.endDate" placeholder="合同截止日期"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">房号</div>
			   	<div class="col-sm-10 parentCls" >
			      <input type="hidden" id="roomNums" value=""/>
			      <span id="roomNumList"></span>
			      <input type="text" class="form-control"  id="roomNum2" placeholder="房号"/>
					 <div id="div_items" class="div_items">  
	                    
	                </div>  
			    </div>
							
			</div>
									<!-- <div class="form-group">
			   	<div class="col-sm-2 control-label"></div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.createUser" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label"></div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.createTime" placeholder=""/>
			    </div>
			</div> -->
									<div class="form-group">
			   	<div class="col-sm-2 control-label">总面积</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.totalSquare" placeholder="总面积"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">租赁人</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.rentUser" placeholder="租赁人"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">业务员</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.salesMan" placeholder="业务员"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">签订日期</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" id="salesDate" v-model="comContract.salesDate" placeholder="" readonly data-am-datepicker/>
			    </div>
			</div>
								
									<div class="form-group">
			   	<div class="col-sm-2 control-label">合同图片</div>
			   	<div class="col-sm-10">
			   		<input id="imageIds"  name="imageIds" v-model="comContract.imageIds"  value="" type="hidden"/>
			   		<span id="imageList"></span>
			      <a class="btn btn-primary" id="upload"><i class="fa fa-plus"></i>&nbsp;上传图片</a>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">是否返租</div>
			   	<div class="col-sm-10">
				   	<label class="radio-inline">
						<input type="radio" name="leasebackFlag" value="0" v-model="comContract.leasebackFlag"/> 是
					</label>
					<label class="radio-inline">
						<input type="radio" name="leasebackFlag" value="1" v-model="comContract.leasebackFlag"/> 否
					</label>
				
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">补充协议</div>
			   	<div class="col-sm-10">
				   	<label class="radio-inline">
						<input type="radio" name="suppleFlag" value="0" v-model="comContract.suppleFlag"/> 是
					</label>
					<label class="radio-inline">
						<input type="radio" name="suppleFlag" value="1" v-model="comContract.suppleFlag"/> 否
					</label>
				
			    </div>
			</div>
			
			<span>收费项目信息</span>
			<hr data-am-widget="divider" style="" class="am-divider am-divider-default" />
				<div class="form-group">
			   	<div class="col-sm-2 control-label">租金（单价）</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitPrice" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">管理费（单价）</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitManage" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">物业费（单价）</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitProperty" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">公共能耗费（单价）</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitEnergy" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">保证金</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitBond" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">居间服务费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitInter" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">停车费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitStop" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">租场费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitOther1" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其他（单价）</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitOther" placeholder=""/>
			    </div>
		    </div>
		    <div v-show="comContract.leasebackFlag == 0" >
			<span>返租合同信息</span>
			<hr data-am-widget="divider" style="" class="am-divider am-divider-default" />
									<div v-if="comContract.leasebackFlag == 0" class="form-group">
			   	<div class="col-sm-2 control-label">合同编号</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.leasebackContract" placeholder=""/>
			    </div>
			</div>
									<div v-if="comContract.leasebackFlag == 0" class="form-group">
			   	<div class="col-sm-2 control-label">业主姓名</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.ownerName" placeholder=""/>
			    </div>
			</div>
									<div v-if="comContract.leasebackFlag == 0" class="form-group">
			   	<div class="col-sm-2 control-label">租金（单价）</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.unitLprice" placeholder=""/>
			    </div>
			</div>
			</div>
			<div v-show="comContract.suppleFlag == 0" >
			<span>补充协议信息</span>
			<hr data-am-widget="divider" style="" class="am-divider am-divider-default" />
									<div class="form-group">
			   	<div class="col-sm-2 control-label">租金</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.supplePrice" placeholder="补充协议租金"/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">管理费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleManage" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">物业费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleProperty" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">公共能耗费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleEnergy" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">保证金</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleBond" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">居间服务费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleInter" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">停车费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleStop" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">租场费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleOther1" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其他</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleOther" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">生效日期</div>
			   	<div class="col-sm-10">
			      <input type="text" id="effectDate" class="form-control" v-model="comContract.effectDate" readonly data-am-datepicker placeholder="生效日期"/>
			    </div>
			</div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">备注</div>
			   	<div class="col-sm-10">
			      <textarea class="form-control" v-model="comContract.remark" placeholder="备注"></textarea>
			    </div>
			</div>			  
							<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
<div id="suppleLayer" style="display: none;">
	<form class="form-horizontal" id="suppleForm">
	<div class="form-group">
		<div class="form-group">
			   	<div class="col-sm-2 control-label">租金</div>
			   	<div class="col-sm-10">
			      <input id="supplePrice" type="text" class="form-control" v-model="comContract.supplePrice" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">管理费</div>
			   	<div class="col-sm-10">
			      <input  id="suppleManage" type="text" class="form-control" v-model="comContract.suppleManage" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">物业费</div>
			   	<div class="col-sm-10">
			      <input  id="suppleProperty" type="text" class="form-control" v-model="comContract.suppleProperty" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">公共能耗费</div>
			   	<div class="col-sm-10">
			      <input  id="suppleEnergy" type="text" class="form-control" v-model="comContract.suppleEnergy" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">保证金</div>
			   	<div class="col-sm-10">
			      <input  id="suppleBond" type="text" class="form-control" v-model="comContract.suppleBond" placeholder=""/>
			    </div>
			</div><div class="form-group">
			   	<div class="col-sm-2 control-label">居间服务费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleInter" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">停车费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleStop" placeholder=""/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">租场费</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="comContract.suppleOther1" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">其他</div>
			   	<div class="col-sm-10">
			      <input  id="suppleOther" type="text" class="form-control" v-model="comContract.suppleOther" placeholder=""/>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">生效日期</div>
			   	<div class="col-sm-10">
			      <input  type="text" id="effectDate2" class="form-control" v-model="comContract.effectDate" readonly data-am-datepicker placeholder=""/>
			    </div>
			</div>
	</div>
	</form>
</div>
<div id="endLayer" style="display: none;">
	<form class="form-horizontal" id="endForm">
	<div class="form-group">
		<div class="form-group">
			   	<div class="col-sm-2 control-label">原因</div>
			   	<div class="col-sm-10">
			      <textarea class="form-control" v-model="comContract.endReason" placeholder=""></textarea>
			    </div>
			</div>
									<div class="form-group">
			   	<div class="col-sm-2 control-label">截止日期</div>
			   	<div class="col-sm-10">
			      <input  type="text" id="endDate2" class="form-control" v-model="comContract.endDate" readonly data-am-datepicker placeholder=""/>
			    </div>
			</div>
				<div class="form-group">
			   	<div class="col-sm-2 control-label">凭证</div>
			   	<div class="col-sm-10">
			   		<input id="imageIds1"  name="imageIds1" v-model="comContract.imageIds1"  value="" type="hidden"/>
			   		<span id="imageList1"></span>
			      <a class="btn btn-primary" id="upload1"><i class="fa fa-plus"></i>&nbsp;上传图片</a>
			    </div>
			</div>					
	</div>
	</form>
</div>
</div>

<script src="../../js/modules/com/comcontract.js"></script>
</body>
</html>